<!--script src="<?php echo base_url();?>script/jquery-1.4.2.min.js" type="text/javascript"></script-->
<script type="text/javascript" src="<?php echo base_url()?>script/jquery.listnav.min-2.1.js"></script>
<link href="<?php echo base_url()?>/style/listnav.css" rel="stylesheet" type="text/css"/>
<link rel="stylesheet" type="text/css" href="<?php echo base_url();?>style/jquery.notifyBar.css" media="screen" />
<script src="<?php echo base_url();?>script/jquery.notifyBar.js" type="text/javascript"></script>
<?php if (isset($addSuccess) && $addSuccess) { ?>
<script type="text/javascript">
    $.notifyBar({
        html: "You have successfully added/changed new representative",
        cls: "success",
        close: "true",
        delay: "4"
        });
</script>
<?php }
elseif (isset($addSuccess) && !$addSuccess) { ?>
<script type="text/javascript">
    $.notifyBar({
        html: "Something went wrong, please try again!",
        cls: "error",
        close: "true",
        delay: "4"
        });
</script>
<?php } ?>
<script type="text/javascript">
$(document).ready(function() {
    $('#myList').listnav({
        includeNums: false,
        showCounts: false
    });
})
</script>
<div id="myList-nav"></div>
<ul id="myList">
    <?php
//    print_r($representatives);
    foreach ($representatives as $key=>$representative) {
        echo "<li>".$representative->rep_name." ".$representative->rep_surname."</li>";
    }
    ?>
</ul>